面([name])

表示由特定数量的半边界定的部分。当前的实现假设一个面始终由三个边组成。

导入

[name] 是一个附加组件,必须显式导入。请参阅 [link:#manual/introduction/Installation Installation / Addons].

import { Face } from 'three/addons/math/ConvexHull.js';

构造函数

[name]()

创建一个 [name] 实例。

属性

[property:Vector3 normal]

面的法线向量。默认值为(0, 0, 0) 处的 [page:Vector3]。

[property:Vector3 midpoint]

面的中点或质心。默认值为(0, 0, 0) 处的 [page:Vector3]。

[property:Float area]

面的面积。默认值为 0。

[property:Float constant]

从面到原点的有符号距离。默认值为 0。

[property:VertexNode outside]

引用该面可以看到的顶点列表中的顶点。默认为 null。

[property:Integer mark]

标记面部是否可见或已删除。默认为 'Visible'。

[property:HalfEdge edge]

对面的基边的引用。要检索所有边,您可以使用当前边的 “next” 引用。默认为空。 null.

方法

[method:Face create]( [param:VertexNode a], [param:VertexNode b], [param:VertexNode c] )

[page:VertexNode a] - 面的第一个顶点。
[page:VertexNode b] - 面的第二个顶点。
[page:VertexNode c] - 面的第三个顶点。

创建一个 [name]。

[method:HalfEdge getEdge]( [param:Integer i] )

[page:Integer i] - 边的索引

返回给定索引的边。

[method:this compute] ()

计算面的所有属性。

[method:Float distanceToPoint]( [param:Vector3 point] )

[page:Vector3 point] - 3D 空间中的任何点。

返回从给定点到该面的平面表示的带符号距离。

源代码

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]